#! /bin/bash
#
message=$(df -hT | awk '{print $6"     "$7}' | sed '1d')

while read line;
 do
    usage=$(echo "$line" | awk '{print $1}')
    mountpoint=$(echo "$line" | awk '{print $2}')
    usage_num=$(echo "$usage" | tr -d '%')
    if [ "$usage_num" -ge 22 ]; then
        echo "警告:$mountpoint 使用率超过22%已达到:$usage"
    fi
done <<< "$message"
